<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>实战任务3</title>
</head>
<body>
    <script>
        let arr = [1,2,-3,7,8,9,4,5,6];
        let sum = 0;
        let min = arr[0]
        let max = arr[0]
        arr.forEach(function (item){
            sum += item;
            if(item < min){
                min = item;
            }else if(item > max){
                max = item;
            }
        })

        console.log("sum",sum)
        console.log("max",max)
        console.log("min",min)
    </script>
</body>
</html>